from django.conf.urls.defaults import *
from company.product.models import *

info_dict = {
    'queryset': Product.objects.all().order_by('-pub_date'),
}

urlpatterns = patterns('',
    # Example:
    # (r'^company/', include('company.foo.urls')),
     
    #just for products
    (r'^products/$', 'company.product.views.product_list' ),
    (r'^product/(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_detail', info_dict),
    
    (r'^news/$', 'company.product.views.news_list' ),
    (r'^news/(?P<news_id>\d+)/$', 'company.product.views.news_detail'),
    
    # Uncomment this for admin:
    (r'^$', 'company.views.index'),
    (r'^admin/', include('django.contrib.admin.urls')),
    (r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/home/jay/tmp/media/'}),
    #(r'^test/$', 'company.views.test'),
)
